Teacher Version
Looped Movement
Topics Covered
- Loops
Virtual Robot: MoveLoopVR.rbg
Physical Robot: MoveLoop.rbg
Check Your Understanding
- What does the Loop do?
- Send the program "flow" back to an earlier point in the program, causing it to repeat some instructions
- Choose between two different possible sets of commands to run
- Repeat a branching decision quickly, to enable continuous control of the robot
- Run all the programs on the robot in a continuous cycle
- How do you add a loop to a program?
- Click the Loop block, then drag a box around the commands you want to put inside the Loop
- Select the blocks you want to put inside the Loop, then right-click and choose "Place in Loop"
- Right-click in an empty area and choose "Make Loop" from the menu that appears
- Drag a Loop into the program, then drag commands into it